﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (this.FileUpload1.FileContent != null)
        {
           string thumbnail800FilePath= this.Server.MapPath( "~/upload/pic800/")+ this.FileUpload1.FileName;
           string thumbnail120FilePath = this.Server.MapPath("~/upload/pic120/") + this.FileUpload1.FileName;
           ThumbLogic.MakeThumbnail(this.FileUpload1.FileContent, thumbnail800FilePath, 800, 600);
           ThumbLogic.MakeThumbnail(this.FileUpload1.FileContent, thumbnail120FilePath, 120, 90);
        }
    }
}
